home *** CD-ROM | disk | FTP | other *** search
Wrap
pppprrrriiiioooo((((5555)))) pppprrrriiiioooo((((5555)))) NNNNAAAAMMMMEEEE prio - priority I/O DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN Priority I/O (prio) refers to adding a "quality of service" to file descriptors in the form of hardware bandwidth allocation and priority request scheduling. The purpose of this mechanism is to manage the sharing of scarce IO resources amongst competing processes, and to permit a given process to reserve a portion of the system's resources for its exclusive use for a period of time. Bandwidth allocation is operated on a file descriptor. Currently, the file descriptor must point to a regular file. In the future more file types may be added. The data flow is assumed to be between memory and the hardware device. When an application makes a bandwidth allocation request, each hardware component along the path will try to allocate required bandwidth. Any failure to allocate along the path causes the entire allocation to fail. Given the limited nature of the bandwidth resource, read and write are separate allocations. The sequence you use the API calls are: 1) if you want to do a series of allocation and reallocation and don't want other applications to interfere, do prioLock(); 2) request bandwidth allocation by doing prioSetBandwidth(); 3) if you want to get bandwidth allocation information, do prioGetBandwidth(); 4) if you did prioLock(), you must do prioUnlock() to release the lock so that other applications can proceed to get their bandwidth allocation. If an application forgets to release the lock, the system will release the lock when the application terminates. A regular file must be on a XFS file system, and do DIRECT I/O (see fcntl(5)) in order to use priority IO functionalities. If the file system resides on a logical volume, it must be striped across all the disks in the volume. On systems that don't have the bandwidth allocation hardware , only priority scheduling is done. The "priority" attribute obeys the normal file attribute sharing semantics. Some amount of system configuration needs to be done before "priority I/O" can be used on the file system. By default, the disk bandwidth is assumed to be zero. A utility _d_i_s_k__b_a_n_d_w_i_d_t_h (see disk_bandwidth(1)) has been provided which can be used to measure the disk bandwidth. This must be run on each disk on which "priority I/O" reservations are expected to be made. After running _d_i_s_k__b_a_n_d_w_i_d_t_h also run _i_o_c_o_n_f_i_g (_1) in order to avail of the just measured bandwidths. See disk_bandwidth(1) for some cautionary notes before using the utility. EEEEXXXXAAAAMMMMPPPPLLLLEEEE char *filename; int fd, holder; fd = open(filename, O_RDONLY); if (prioSetBandwidth(fd, PRIO_READ_ALLOCATE, 200000, &holder) < 0) PPPPaaaaggggeeee 1111 pppprrrriiiioooo((((5555)))) pppprrrriiiioooo((((5555)))) if (errno == ENOLCK) { printf("The lock holder is: %d\n", holder); exit(1); } NNNNOOOOTTTTEEEE In IRIX 6.5, the Priority I/O APIs have been merged with the GRIO APIs. As a result, the use of the Priority I/O APIs is deprecated. For backwards compatibility, pppprrrriiiiooooSSSSeeeettttBBBBaaaannnnddddwwwwiiiiddddtttthhhh and pppprrrriiiiooooGGGGeeeettttBBBBaaaannnnddddwwwwiiiiddddtttthhhh are still supported. pppprrrriiiiooooLLLLoooocccckkkk and pppprrrriiiiooooUUUUnnnnlllloooocccckkkk are merely stubs. No locking or atomicity is guaranteed. Please refer to grio(5) for further details. SSSSEEEEEEEE AAAALLLLSSSSOOOO disk_bandwidth(1m), prio(3X), grio(5). PPPPaaaaggggeeee 2222